package com.example.springboot;

import com.example.springboot.controller.Colour;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Application implements InitializingBean {
    @Autowired
    private Colour colour;
    @Value("${hello}")
    private String test;
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println(colour.getColours());
        System.out.println(test);
    }
}
